<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateOrgTeamTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('org_team', function (Blueprint $table) {
            $table->increments('team_id');
            $table->string('name')->default('')->comment('团队名称');
            $table->unsignedInteger('master_uid')->index()->comment('负责人UID');
            $table->unsignedInteger('department_id')->comment('部门ID');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('org_team');
    }
}
